package me.flyray.admin.mapper;

import me.flyray.admin.entity.Element;
import org.apache.ibatis.annotations.Param;
import tk.mybatis.mapper.common.Mapper;
import tk.mybatis.mapper.entity.Example;

import java.util.List;
import java.util.Map;

public interface ElementMapper extends Mapper<Element> {
    public List<Element> selectAuthorityElementByUserId(@Param("userId")String userId);
    public List<Element> selectAuthorityMenuElementByUserId(@Param("userId")String userId,@Param("menuId")String menuId);
    public List<Element> selectAuthorityElementByClientId(@Param("clientId")String clientId);
    public List<Element> selectAllElementPermissions();
	public List<Element> selectAuthorityElementByRoleId(@Param("roleId")int roleId);
	public List<Element> selectAuthorityElementByRoleIdAndMenuId(@Param("roleId")int roleId,@Param("menuId")int menuId);
	public Map<String, Object> selectByDeptId(Example example);
}